package com.qiaofang.applet.common.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author QF2019
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("分页查询请求入参")
public class PageDataRequest<T> extends DataRequest<T>{

    private static final long serialVersionUID = -1;

    @NotNull(message = "页面不能为空")
    @ApiModelProperty(value = "页码", example = "1")
    private int pageNo;

    @NotNull(message = "每页数据条数")
    @ApiModelProperty(value = "每页数据条数", example = "20")
    private int pageSize;

    @ApiModelProperty(value = "排序字段", hidden = true)
    private List<OrderDto> orderDtos;
}
